package com.leeon.string;

import java.io.PrintStream;
import java.util.Formatter;

public class Turtle {

	private String name;
	private Formatter f;
	public Turtle(String name,Formatter f){
		this.name = name;
		this.f = f;
	}
	
	public void move(int x,int y){
		f.format("%s the turtle ls at (%d,%d)\n",name,x,y);
	}
	
	public static void main(String[] args){
		PrintStream outAlias = System.out;
		Turtle tommy = new Turtle("LEEON", new Formatter(System.err));
		Turtle terry = new Turtle("Turtle", new Formatter(System.out));
		tommy.move(0, 0);
		tommy.move(1, 0);
		tommy.move(2, 0);
		tommy.move(3, 0);
		tommy.move(4, 0);
		terry.move(1, 1);
		terry.move(5, 1);
		terry.move(6, 1);
		terry.move(7, 1);
		terry.move(8, 1);
		
		
	}
	
}
